Make GtkColorSelection use GtkStyleContext
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 10 Jan 2011 01:31:23 +0000 (02:31 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 10 Jan 2011 02:49:59 +0000 (03:49 +0100)
gtk/gtkcolorsel.c

index b817f2e3bbcee0b2eace7814f678112f3e50c760..f60d1e7805ef0f214c8d45fbc9a50b8238a727d2 100644 (file)
@@ -1112,11 +1112,15 @@ palette_draw (GtkWidget *drawing_area,
                cairo_t   *cr,
               gpointer   data)
 {
+  GtkStyleContext *context;
   gint focus_width;
+  GdkRGBA color;
 
-  gdk_cairo_set_source_color (cr, &gtk_widget_get_style (drawing_area)->bg[GTK_STATE_NORMAL]);
+  context = gtk_widget_get_style_context (drawing_area);
+  gtk_style_context_get_background_color (context, 0, &color);
+  gdk_cairo_set_source_rgba (cr, &color);
   cairo_paint (cr);
-  
+
   if (gtk_widget_has_focus (drawing_area))
     {
       set_focus_line_attributes (drawing_area, cr, &focus_width);